<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            font-size:50px;
        }
    </style>
    <script>
        function isInteger(c) {
            return c%1 === 0;
        }

        var price = 56//单价
        var count;//数量
        count = prompt(price+"元一杯，您要多少杯?");

        if(isNaN(count)){
            document.write("这根本不是数字！！！");
        }
        else {
            if(isInteger(count)){
                if (count % 2 == 0) {
                    totalPrice = count * price * 0.75;
                }
                else {
                    totalPrice = count * price * 0.75 + price / 4;
                }
                document.write("您总共消费了" + totalPrice + "元");
            }
            else{
                document.write("必须整数杯");
            }
        }
    </script>
</head>
<body>

</body>
</html>